﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ThoughtWorks.QRCode.Codec;
using System.Drawing;
using ThoughtWorks.QRCode.Codec.Data;
using System.Text;


/// <summary>
///QR 的摘要说明
/// </summary>
namespace ProductQR
{

    public class QR
    {


        public Bitmap BarcodeImage(String barcodeText)
        {
            QRCodeEncoder qrCodeEncoder = new QRCodeEncoder();//创建二维码生成类
            qrCodeEncoder.QRCodeScale = 5;//编码测量度
            qrCodeEncoder.QRCodeVersion = 0;//编码版本
            Bitmap img = qrCodeEncoder.Encode(barcodeText, Encoding.UTF8);//utf-8支持中文格式
            return img;
        }



    }
}